

import React, { Component } from 'react';
import {
  Text,
  View,
  StyleSheet,
  Image,
  TouchableWithoutFeedback
} from 'react-native';
import global from "../../global/index"
class MyBottom extends Component {
  constructor(props) {
    super(props);
  }
  press() {
    // console.log("route", global._style)
    if (this.props.onPress) {
      this.props.onPress();
    } else {
      console.log("please set function'onPress'")
    }
  }
  render() {
    return (
      <View  >
        <Text
          style={[global._style.btn.default, this.props.style || '']}
          onPress={() => { this.press(); }}>
          {this.props.title || '你的按钮'}
        </Text>
      </View>
    );
  }
};

// const styles = StyleSheet.create({
//   btn: {

//   }
// });

export default MyBottom;
